package chapter4.No4_1_使用reentrantLock类.demo9;

/**
 * Created by Administrator on 2016/11/21.
 */
public class ThreadSet extends Thread {
    ServiceClass sc;

    public ThreadSet(ServiceClass sc) {
        this.sc = sc;
    }

    @Override
    public void run() {
        try {
            while(true) {
                Thread.sleep(500);
                sc.set();
            }
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
    }
}
